<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/nav-top.css">
    <link rel="stylesheet" href="/css/mainPage.css">
    <link rel="stylesheet" href="/css/Product.css">
    <link rel="stylesheet" href="/css/user.css">
    <link rel="stylesheet" href="/css/productUpdate.css">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<div class="nav-top-1">
    <div class="nav_logo">
        <span  >JPetStore</span>
    </div>
    <div class="nav_search">
        <div id="search">
            <input type="text" class="search_input" id="keyword">
        </div>
        <div id="productAutoComplete">
            <ul id="productAutoList"></ul>
        </div>
    </div>
    <ul class="nav_link">
        <li class="nav-top-item">
            <a href="#" class="link"  >设置</a>
        </li>
        <li class="nav-top-item">
            <a href="#" class="link"  >订单</a>
        </li>
        <li class="nav-top-item">
            <a href="02.html" class="link"><span style="color:#215496;font-weight:bold">商品</span></a>
        </li>
        <li class="nav-top-item">
            <a href="01.html" class="link"  >首页</a>
        </li>
    </ul>
</div>
<div class="panel">
    <form th:action="@{/updateOver}" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                <td>
                    <div><input type="file" id="file" name="newImage"></div>
                    <p class="btn">选择图片</p>
                    <input type="text" name="userId" th:value="${product.userid}" hidden>

                </td>
            </tr>
            <tr>
                <td>
                    <div class="product_id">
                        <div>productId:</div>
                        <div class="product_id-1"><p th:text="${product.productId}"></p></div>
                    </div>
                </td>
                <td>
                    <input type="text"  name="productId" th:value="${product.productId}" hidden>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="line">Product Name:</div>
                </td>
                <td>
                    <input type="text" name="name" th:value="${product.name}">
                </td>
            </tr>
            <tr>
                <td>
                    <div class="line">Description:</div>
                </td>
                <td>
                    <input type="text" name="description" th:value="${product.description}">
                </td>
            </tr>
            <tr>
                <td>
                    <div class="line">Quantity:</div>
                </td>
                <td>
                    <input type="number" name="quantity" th:value="${product.quantity}">
                </td>
            </tr>
            <tr>
                <td>
                    <div class="line">List Price:</div>
                </td>
                <td>
                    <input type="number" name="price" th:value="${product.price}">
                </td>
            </tr>
        </table>
        <div><button type="submit" class="btn">保存修改</button>
            <button class="btn">取消</button>
        </div>
    </form>
</div>
<script>
    $('p').eq(0).click(function () {
        $('#file').click()
    })
</script>
</body>
</html>